package model;

import java.util.Date;

/**
 * 商品分享实体类
 */
public class Share {
    // 分享ID
    private int id;
    // 用户ID
    private Integer user_id;
    // 商品ID
    private int goods_id;
    // 分享类型
    private String share_type;
    // 分享时间
    private Date share_time;
    // 分享IP
    private String share_ip;
    // 关联的用户对象
    private User user;
    // 关联的商品对象
    private Goods goods;

    public Share() {
    }

    public Share(Integer user_id, int goods_id, String share_type, String share_ip) {
        this.user_id = user_id;
        this.goods_id = goods_id;
        this.share_type = share_type;
        this.share_ip = share_ip;
        this.share_time = new Date();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }

    public int getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(int goods_id) {
        this.goods_id = goods_id;
    }

    public String getShare_type() {
        return share_type;
    }

    public void setShare_type(String share_type) {
        this.share_type = share_type;
    }

    public Date getShare_time() {
        return share_time;
    }

    public void setShare_time(Date share_time) {
        this.share_time = share_time;
    }

    public String getShare_ip() {
        return share_ip;
    }

    public void setShare_ip(String share_ip) {
        this.share_ip = share_ip;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }

    @Override
    public String toString() {
        return "Share{" +
                "id=" + id +
                ", user_id=" + user_id +
                ", goods_id=" + goods_id +
                ", share_type='" + share_type + '\'' +
                ", share_time=" + share_time +
                ", share_ip='" + share_ip + '\'' +
                '}';
    }
} 